package DataStructures;

/**
 * Created by msingh on 2014-06-28.
 */
public class FindFactorial {
    public int fact(int n) {
        int result = 1;
        while (n != 0) {
            result = result * n;
            n--;
        }
        return result;
    }

    public static void main(String[] args) {
        FindFactorial fac = new FindFactorial();
        System.out.println("Factorial of n=0  is : " + fac.fact(0));

    }

}
